using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace octalforty.Componento.SemanticModel
{
    public class Repository
    {
        #region Private Fields
        private readonly Uri uri;
        private readonly List<RepositoryEntry> entries = new List<RepositoryEntry>();
        #endregion

        public Uri Uri
        {
            get { return uri; }
        }

        public ReadOnlyCollection<RepositoryEntry> Entries
        {
            get { return new ReadOnlyCollection<RepositoryEntry>(entries); }
        }

        public Repository(Uri uri)
        {
            this.uri = uri;
        }

        public Repository(Uri uri, IEnumerable<RepositoryEntry> entries) :
            this(uri)
        {
            this.entries.AddRange(entries);
        }
    }
}
